<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    
</body>
<script>
    debugger;
    /* var a = 1;
    while(a <= 100){
        a % 7 == 0 ? document.write(a + "<br>") : a;
        a++;
    } */

    /* var a = 1;
    while(a <= 100){
        a % 2 ==0 ? a : document.write(a + "<br>");
        a++;
    } */

    var a = 1;
    sum = 0;
    while(a <= 100){
        /* if(a % 2 ==0){
            sum = sum + a;
        }else{
            a;
        } */
        a % 2 == 0 ? sum = sum + a : a;
        a++;
    }
    document.write(sum);
</script>
</html>